.class Lcom/waiqin365/lightapp/im/activity/h;
.super Ljava/lang/Thread;


# instance fields
.field final synthetic a:Lcom/hyphenate/chat/EMImageMessageBody;

.field final synthetic b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Lcom/hyphenate/chat/EMImageMessageBody;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/im/activity/h;->b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    iput-object p2, p0, Lcom/waiqin365/lightapp/im/activity/h;->a:Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-direct {p0}, Ljava/lang/Thread;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 3

    invoke-super {p0}, Ljava/lang/Thread;->run()V

    :try_start_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/h;->b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/f;->a(Landroid/content/Context;)Lcom/fiberhome/gaea/client/d/f;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/h;->a:Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMImageMessageBody;->getRemoteUrl()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/fiberhome/gaea/client/d/f;->b(Ljava/lang/String;)Lcom/squareup/picasso/RequestCreator;

    move-result-object v0

    invoke-virtual {v0}, Lcom/squareup/picasso/RequestCreator;->get()Landroid/graphics/Bitmap;

    move-result-object v0

    const/16 v1, 0x64

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/activity/h;->a:Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v2}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v2

    invoke-static {v0, v1, v2}, Lcom/waiqin365/compons/camera/b/a;->a(Landroid/graphics/Bitmap;ILjava/lang/String;)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/h;->b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/h;->a:Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMImageMessageBody;->getLocalUrl()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->a(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/h;->b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    new-instance v1, Lcom/waiqin365/lightapp/im/activity/i;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/activity/i;-><init>(Lcom/waiqin365/lightapp/im/activity/h;)V

    invoke-virtual {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/activity/h;->b:Lcom/waiqin365/lightapp/im/activity/ChatActivity;

    iget-object v1, p0, Lcom/waiqin365/lightapp/im/activity/h;->a:Lcom/hyphenate/chat/EMImageMessageBody;

    invoke-virtual {v1}, Lcom/hyphenate/chat/EMImageMessageBody;->thumbnailLocalPath()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/waiqin365/lightapp/im/activity/ChatActivity;->a(Lcom/waiqin365/lightapp/im/activity/ChatActivity;Ljava/lang/String;)Ljava/lang/String;

    goto :goto_0
.end method
